From 764b47d7d49ee13460565f59774c1aded665790f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 4 Sep 2025 16:38:55 -0400 Subject: [PATCH] try to fix format issue on website --- ..._ea2368e228753931099084e634c7bbca._comment | 30 ++++--------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/doc/bugs/35_failed_tests_on_beegfs/comment_5_ea2368e228753931099084e634c7bbca._comment b/doc/bugs/35_failed_tests_on_beegfs/comment_5_ea2368e228753931099084e634c7bbca._comment index c2353a4f68..c76456bf20 100644 --- a/doc/bugs/35_failed_tests_on_beegfs/comment_5_ea2368e228753931099084e634c7bbca._comment +++ b/doc/bugs/35_failed_tests_on_beegfs/comment_5_ea2368e228753931099084e634c7bbca._comment @@ -14,7 +14,7 @@ In that report I hypothesized that Beegfs might not like an open file to be renamed. I'm not sure if we ever verified my fixes in that one fixed a problem with Beegfs, but it still seems like a good hypothesis. -"export.ex/" is a log file that git-annex uses to keep track of files +`export.ex/` is a log file that git-annex uses to keep track of files that were part of a tree exported to a special remote, but that were excluded from the export by its preferred content settings. To populate that file, git-annex opens a temp file, writes to it as the export runs, then closes it @@ -25,37 +25,17 @@ and renames it. close(14) = 0 rename(".git/annex/othertmp/cfd9e482-a5cc-42.0/cfd9e482-a5cc-42", ".git/annex/export.ex/cfd9e482-a5cc-4277-8ec1-954c5e95060f") = 0 -If the rename() fails, it falls back to trying "mv", which is why -there are also "mv" errors in the transcript above. Anyway, I've verified +If the rename() fails, it falls back to trying mv, which is why +there are also mv errors in the transcript above. Anyway, I've verified the FD is closed before that point. But, the "..." includes some fork and exec. And this FD is never set close-on-exec! And the processes started while it's open include -"git cat-file --batch", which is a long-running process that will +`git cat-file --batch`, which is a long-running process that will still be left running when the rename happens. This was pretty surprising to me, I did not realize git-annex was generally -leaking FDs to child processes in this way. It's easy to demonstrate with -a simpler program: - - joey@darkstar:~>cat >foo.hs <runghc foo.hs - total 0 - lrwx------ 1 joey joey 64 Sep 4 14:11 0 -> /dev/pts/8 - lrwx------ 1 joey joey 64 Sep 4 14:11 1 -> /dev/pts/8 - l-wx------ 1 joey joey 64 Sep 4 14:11 11 -> /dev/tty - l-wx------ 1 joey joey 64 Sep 4 14:11 12 -> /home/joey/foo.x - lrwx------ 1 joey joey 64 Sep 4 14:11 2 -> /dev/pts/8 - lr-x------ 1 joey joey 64 Sep 4 14:11 3 -> /proc/516659/fd +leaking FDs to child processes in this way. So, really supporting this would mean auditing every file git-annex opens with openFile to see if the handle is ever passed to a child process, -- 2.30.2